import { CreationOptional, InferAttributes, InferCreationAttributes } from 'sequelize'
import { AutoIncrement, Column, DataType, Model, PrimaryKey, Table } from 'sequelize-typescript'

@Table({ tableName: 'fj_member_prize_record', underscored: true, timestamps: false })
export class MemberPrizeRecord extends Model<
    InferAttributes<MemberPrizeRecord>,
    InferCreationAttributes<MemberPrizeRecord>
> {
    @AutoIncrement
    @PrimaryKey
    @Column(DataType.BIGINT)
    declare id: CreationOptional<number>

    @Column(DataType.DATE)
    declare create_time: string

    @Column(DataType.BIGINT)
    declare member_id: number

    @Column(DataType.STRING(255))
    declare name: string

    @Column(DataType.STRING(255))
    declare nickname: string

    @Column(DataType.STRING(255))
    declare image: string

    @Column(DataType.INTEGER)
    declare number: number

    @Column(DataType.BIGINT)
    declare dealer_id: number

    @Column(DataType.STRING(255))
    declare head_image: string

    @Column(DataType.DECIMAL(10, 2))
    declare probability: string

    @Column(DataType.DECIMAL(10, 2))
    declare price: string

    @Column(DataType.TINYINT)
    declare level: number

    @Column(DataType.STRING(20))
    declare currency_id: string
}
